﻿<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<Comissoes.Models.CondicoesPagamentoModel>" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <%= ViewData["scripts"] %>
    <!-- JS Custom -->
    <script type="text/javascript" src="../../Scripts/cadastros/condicoespagamento.js"></script>
</head>
<body>
    <div class="cabecalho ui-state-highlight">
        <span class="icodtl" />
        <span class="txt">
            <%= Html.Encode("Detalhes da COndição de Pagamento") %>
        </span>
    </div>
    <fieldset class="container transparent">
        <label class="input80">
            <button type="button" class="documentcommand" onclick="loadOption('/CondicoesPagamento/Update', true);">Nova Condição</button>
        </label>
        <label class="input80">
            <button class="pencilcommand" type="button" onclick="Edit('CondicoesPagamento', 'COD_CDPG', true)">Editar</button>
        </label>
        <label class="input80">
            <button class="listcommand" type="button" onclick="List('CondicoesPagamento', true)">Retornar</button>
        </label>
        <label class="input80">
            <button class="trashcommand" type="button" onclick="deleteDialog('condição de pagamento', 'CondicoesPagamento', <%= Html.Encode(Model.condicao.COD_CDPG) %>)">Excluir</button>
        </label>
    </fieldset>
    <fieldset class="container field440 border ui-widget-content ui-corner-all">
        <fieldset class="also container field100 float">               
	        <table id="tDias"></table>
            <div id="pDias"></div>
        </fieldset>
        <fieldset class="container field300 transparent float">
            <%= Html.Hidden("COD_CDPG",Html.Encode(Model.condicao.COD_CDPG)) %>

            <%= Html.Label("for60 clear", "Descrição:")%>
            <%= Html.Label("for220 ui-state-default", Model.condicao.DESC_CDPG) %>

            <%= Html.Label("for60 clear", "Tipo:")%>
            <%= Html.Label("for100 ui-state-default", Model.condicao.TIPO_CDPG == "A" ? "Crediário" : "Comercial") %>

            <% if (Model.condicao.TIPO_CDPG == "A")
               { %>
                    <%= Html.Label("for60 clear", "Taxa:")%>
                    <%= Html.Label("for100 ui-state-default right", Html.Encode(Model.condicao.TAXA_CDPG)) %>
            <% }
               else
               { %>
                    <%= Html.Label("for80 right", "Coeficiente:") %>
                    <%= Html.Label("for180 ui-state-default right", Html.Encode(Model.condicao.COEF_CDPG)) %>

                    <%= Html.Label("for40 right", "Dia:") %>
                    <%= Html.Label("for100 ui-state-default right", Html.Encode(Model.condicao.DIA_CDPG)) %>

                    <%= Html.Label("for60 right", "Parcelas:") %>
                    <%= Html.Label("for100 ui-state-default right", Html.Encode(Model.condicao.PARCELAS_CDPG)) %>

                    <%= Html.Label("for40 right", "TAC:") %>
                    <%= Html.Label("for100 ui-state-default right", Html.Encode(Model.condicao.TAC_CDPG)) %>   
            <% } %>
        </fieldset>
    </fieldset>
</body>
</html>